﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BusinessLogicLayer
{
    public class ValidateResult
    {
        public List<string> Messages { get; set; }
        public bool Valid
        {
            get { return !Messages.Any(); }
        }

        public ValidateResult()
        {
            Messages = new List<string>();
        }

        public void AddMessage(string msg)
        {
            Messages.Add(msg);
        }

        public override string ToString()
        {
            string s = "";
            foreach (string a in Messages)
            {
                s += a + "\n";
            }
            return s;
        }
    }
}
